#include "opencv2/opencv.hpp"
#include <iostream>

using namespace cv;

int main(int, char** argv)
{
    std::cout << "Hello, World!" << std::endl;

    FileStorage fs("daHuaCamConfig.yml", FileStorage::WRITE);

    bool IsGrabModeContinuesMy = true;
    fs << "IsGrabModeContinuesMy" << IsGrabModeContinuesMy;
    bool IsAutoExposureMy = false;
    fs << "IsAutoExposureMy" << IsAutoExposureMy;

    int exposeTimeMy = 7000;
    fs << "exposeTimeMy" << exposeTimeMy
       << "TimeExposMin"<< 16
       << "TimeExposMax"<< 1e+06
       << "TimeExposDefaults" << 7000;

    int gainRawMy = 6;
    fs << "gainRawMy" << gainRawMy
       << "gainRawMin"<< 1
       << "gainRawMax"<< 6
       << "gainRawDefaults" << 6;

    double GammaMy = 0.65;
    fs << "GammaMy" << GammaMy
       << "GammaMin"<< 0
       << "GammaMax"<< 4
       << "GammaDefaults" << 0.65;

    int frameRateMy = 210;
    fs << "frameRateMy" << frameRateMy
       << "frameRateMax"<< 210;

    fs << "BalanceRationMin" << 1 <<"BalanceRationMax" << 255;
    int redBalanceRatioMy = 1;
    fs << "redBalanceRatioMy" << redBalanceRatioMy;
    int greenBalanceRatioMy = 1;
    fs << "greenBalanceRatioMy" << greenBalanceRatioMy;
    int blueBalanceRatioMy = 1;
    fs << "blueBalanceRatioMy" << blueBalanceRatioMy;

    int imgWidth = 800;
    fs << "imgWidth" << imgWidth;
    int imgHeight = 600;
    fs << "imgHeight" << imgHeight;

    fs.release();
    return 0;
}